Skip to content

fix(app-shell): a full-height console page gives the impersonation banner its height back - #37588

Draft
objectstack-fleet[bot] wants to merge 3 commits into
mainfrom
claude/project-thread-th9squ
Draft

objectstack-fleet[bot] wants to merge 3 commits into
mainfrom
claude/project-thread-th9squ

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #37528

What changes

  • ChromeBannerSlot (app-shell/src/layout/chromeBannerHost.tsx): when the console's standing banners (impersonation, read rate, storage) are drawn in place above the routes, a display: contents wrapper measures them (ResizeObserver on each child, MutationObserver for banners that come and go) and publishes the summed height as --os-chrome-banners on the document root; cleared on unmount and while nothing is drawn. Drawn into an app layout's host (desktop, inside an app, objectstack#36112) nothing is published, as that host sits inside the content area.
  • The console's full-height shells take the viewport less that property, through CONSOLE_FULL_HEIGHT (module-local constants, literal Tailwind classes): AppShell in @object-ui/layout (height, and a min-h- that tailwind-merge puts in place of the sidebar wrapper's own min-h-svh), StudioDesignSurface, HomeLayout, AiChatPage, the two organization layouts, the app-unavailable / no-app screens in AppContent, and StudioRoute's access-required screen. The property is unset outside the console and on an ordinary session, so every class there computes to the plain viewport height.
  • The banner keeps its place in flow (objectui#4467) and its sticky; nothing about where it is drawn changes.

Why

While an administrator impersonates a user, the banner sat in flow above a shell that still took 100svh / 100vh, so the document was taller than the window by the banner's height: list footers and bulk action bars fell below the fold and the page grew a second scrollbar.

Measured on main (4116465) in a local console against examples/app-crm (--fresh), impersonating a seeded user, document.documentElement.scrollHeight against innerHeight:

page 1280×768 before 1280×768 after 390×844 before 390×844 after
/home 768 / 768 (redirects into the app) 768 / 768 921 / 844 844 / 844
an app list (crm_lead) 768 / 768 (#36112 host) 768 / 768 921 / 844 844 / 844
/studio 821 / 768 768 / 768 921 / 844 844 / 844

The first push fixed /home only: the sidebar wrapper's own min-h-svh and Studio's access-required screen still overflowed, which the second commit covers.

Verification

  • New layout/__tests__/chromeBannerHost.bannerHeight-37528.test.tsx (5 cases: in place publishes the summed height and clears on unmount; no banner publishes nothing; a resize and a banner going away republish; drawn into the host publishes nothing; every full-height class reads the property with a 0px fallback). With chromeBannerHost.tsx restored from main, 3 of the 5 go red (the two "nothing published" cases are controls).
  • pnpm --dir ui exec vitest run over packages/layout/, packages/app-shell/src/layout/, src/console/__tests__/, src/console/home, src/console/ai, src/console/organizations, src/views/studio-design, the print stylesheet pin, apps/console/src/components and the boot-redirect pins: all green (3,325 + 3,862 tests). ai-surface-unavailable in ConsoleShell is deliberately left on h-screen: bootRedirectCoverage.test.tsx reads that class as the full-viewport cover.
  • type-check for @object-ui/app-shell and @object-ui/layout: clean. eslint on the changed files: 0 errors.
  • The full UI suite runs in this PR's CI.
  • overlap-check: exit 0 (shares StudioDesignSurface.tsx with feat(studio): 概览 package overview page — Info and Pending tabs, ⋯ menu in its header #37546 and AiChatPage.tsx with fix(chatbot): redraw record-citation chips after a reload; keep the cited-section scroll to new clicks #37539, both merge cleanly).

Clause-②: no
Metadata-protocol: none

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (not touched)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; eslint on the changed files passes (the full pnpm lint runs in CI).
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (not touched)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done. (full local suite not run; CI carries it)

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri

… their height back

Claude-Session: https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri
Co-authored-by: Claude <noreply@anthropic.com>
… app-state screens, give the banners their height back too

Claude-Session: https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 26, 2026
…37528)

StudioRoute.tsx lives in the published @object-ui/console package.

Claude-Session: https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri
Co-authored-by: Claude <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Impersonation banner adds its height to a full-height shell: list footers and bulk action bars fall below the viewport

2 participants